3.3.59 \(\int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx\) [259]

3.3.59.1 Optimal result
3.3.59.2 Mathematica [A] (verified)
3.3.59.3 Rubi [A] (verified)
3.3.59.4 Maple [C] (verified)
3.3.59.5 Fricas [C] (verification not implemented)
3.3.59.6 Sympy [F]
3.3.59.7 Maxima [F]
3.3.59.8 Giac [F]
3.3.59.9 Mupad [F(-1)]

3.3.59.1 Optimal result

Integrand size = 23, antiderivative size = 80 \[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\frac {\operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right ) \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{f \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}} \]

output
EllipticF(sin(f*x+e),(a/(a+b))^(1/2))*(1-a*sin(f*x+e)^2/(a+b))^(1/2)/f/(co 
s(f*x+e)^2)^(1/2)/(sec(f*x+e)^2*(a+b-a*sin(f*x+e)^2))^(1/2)
 
3.3.59.2 Mathematica [A] (verified)

Time = 0.88 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.86 \[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\frac {\sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{a+b}} \operatorname {EllipticF}\left (e+f x,\frac {a}{a+b}\right ) \sec (e+f x)}{\sqrt {2} f \sqrt {a+b \sec ^2(e+f x)}} \]

input
Integrate[Sec[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]
 
output
(Sqrt[(a + 2*b + a*Cos[2*(e + f*x)])/(a + b)]*EllipticF[e + f*x, a/(a + b) 
]*Sec[e + f*x])/(Sqrt[2]*f*Sqrt[a + b*Sec[e + f*x]^2])
 
3.3.59.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.12, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4636, 2057, 2058, 323, 321}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)^2}}dx\)

\(\Big \downarrow \) 4636

\(\displaystyle \frac {\int \frac {1}{\left (1-\sin ^2(e+f x)\right ) \sqrt {a+\frac {b}{1-\sin ^2(e+f x)}}}d\sin (e+f x)}{f}\)

\(\Big \downarrow \) 2057

\(\displaystyle \frac {\int \frac {1}{\left (1-\sin ^2(e+f x)\right ) \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}d\sin (e+f x)}{f}\)

\(\Big \downarrow \) 2058

\(\displaystyle \frac {\sqrt {-a \sin ^2(e+f x)+a+b} \int \frac {1}{\sqrt {1-\sin ^2(e+f x)} \sqrt {-a \sin ^2(e+f x)+a+b}}d\sin (e+f x)}{f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\)

\(\Big \downarrow \) 323

\(\displaystyle \frac {\sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \int \frac {1}{\sqrt {1-\sin ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}d\sin (e+f x)}{f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\)

\(\Big \downarrow \) 321

\(\displaystyle \frac {\sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right )}{f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\)

input
Int[Sec[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]
 
output
(EllipticF[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a 
 + b)])/(f*Sqrt[1 - Sin[e + f*x]^2]*Sqrt[(a + b - a*Sin[e + f*x]^2)/(1 - S 
in[e + f*x]^2)])
 

3.3.59.3.1 Defintions of rubi rules used

rule 321
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> S 
imp[(1/(Sqrt[a]*Sqrt[c]*Rt[-d/c, 2]))*EllipticF[ArcSin[Rt[-d/c, 2]*x], b*(c 
/(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 
0] &&  !(NegQ[b/a] && SimplerSqrtQ[-b/a, -d/c])
 

rule 323
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> S 
imp[Sqrt[1 + (d/c)*x^2]/Sqrt[c + d*x^2]   Int[1/(Sqrt[a + b*x^2]*Sqrt[1 + ( 
d/c)*x^2]), x], x] /; FreeQ[{a, b, c, d}, x] &&  !GtQ[c, 0]
 

rule 2057
Int[(u_.)*((a_) + (b_.)/((c_) + (d_.)*(x_)^(n_)))^(p_), x_Symbol] :> Int[u* 
((b + a*c + a*d*x^n)/(c + d*x^n))^p, x] /; FreeQ[{a, b, c, d, n, p}, x]
 

rule 2058
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))^(q_.)*((c_) + (d_.)*(x_)^(n_))^ 
(r_.))^(p_), x_Symbol] :> Simp[Simp[(e*(a + b*x^n)^q*(c + d*x^n)^r)^p/((a + 
 b*x^n)^(p*q)*(c + d*x^n)^(p*r))]   Int[u*(a + b*x^n)^(p*q)*(c + d*x^n)^(p* 
r), x], x] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4636
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ 
))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f 
 Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x], x 
, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] 
 && IntegerQ[n/2] &&  !IntegerQ[p]
 
3.3.59.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.49 (sec) , antiderivative size = 243, normalized size of antiderivative = 3.04

method result size
default \(-\frac {2 \sqrt {-\frac {i \left (i \cos \left (f x +e \right ) a -\sqrt {a}\, \sqrt {b}\, \cos \left (f x +e \right )+i b +\sqrt {a}\, \sqrt {b}\right )}{\left (a +b \right ) \left (1+\cos \left (f x +e \right )\right )}}\, \sqrt {-\frac {i \left (\sqrt {a}\, \sqrt {b}\, \cos \left (f x +e \right )+i \cos \left (f x +e \right ) a -\sqrt {a}\, \sqrt {b}+i b \right )}{\left (a +b \right ) \left (1+\cos \left (f x +e \right )\right )}}\, \operatorname {EllipticF}\left (\sqrt {\frac {2 i \sqrt {a}\, \sqrt {b}+a -b}{a +b}}\, \left (\cot \left (f x +e \right )-\csc \left (f x +e \right )\right ), \sqrt {-\frac {4 i a^{\frac {3}{2}} \sqrt {b}-4 i \sqrt {a}\, b^{\frac {3}{2}}-a^{2}+6 a b -b^{2}}{\left (a +b \right )^{2}}}\right ) \left (\sec \left (f x +e \right )+1\right )}{f \sqrt {\frac {2 i \sqrt {a}\, \sqrt {b}+a -b}{a +b}}\, \sqrt {a +b \sec \left (f x +e \right )^{2}}}\) \(243\)

input
int(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)
 
output
-2/f/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)*(-I/(a+b)*(I*cos(f*x+e)*a-a^( 
1/2)*b^(1/2)*cos(f*x+e)+I*b+a^(1/2)*b^(1/2))/(1+cos(f*x+e)))^(1/2)*(-I/(a+ 
b)*(a^(1/2)*b^(1/2)*cos(f*x+e)+I*cos(f*x+e)*a-a^(1/2)*b^(1/2)+I*b)/(1+cos( 
f*x+e)))^(1/2)*EllipticF(((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)*(cot(f*x+ 
e)-csc(f*x+e)),(-(4*I*a^(3/2)*b^(1/2)-4*I*a^(1/2)*b^(3/2)-a^2+6*a*b-b^2)/( 
a+b)^2)^(1/2))/(a+b*sec(f*x+e)^2)^(1/2)*(sec(f*x+e)+1)
 
3.3.59.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.10 (sec) , antiderivative size = 303, normalized size of antiderivative = 3.79 \[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=-\frac {{\left (2 i \, a^{\frac {3}{2}} \sqrt {\frac {a b + b^{2}}{a^{2}}} + \sqrt {a} {\left (i \, a + 2 i \, b\right )}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} F(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}}) + {\left (-2 i \, a^{\frac {3}{2}} \sqrt {\frac {a b + b^{2}}{a^{2}}} + \sqrt {a} {\left (-i \, a - 2 i \, b\right )}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} F(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}})}{a^{2} f} \]

input
integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="fricas")
 
output
-((2*I*a^(3/2)*sqrt((a*b + b^2)/a^2) + sqrt(a)*(I*a + 2*I*b))*sqrt((2*a*sq 
rt((a*b + b^2)/a^2) - a - 2*b)/a)*elliptic_f(arcsin(sqrt((2*a*sqrt((a*b + 
b^2)/a^2) - a - 2*b)/a)*(cos(f*x + e) + I*sin(f*x + e))), (a^2 + 8*a*b + 8 
*b^2 + 4*(a^2 + 2*a*b)*sqrt((a*b + b^2)/a^2))/a^2) + (-2*I*a^(3/2)*sqrt((a 
*b + b^2)/a^2) + sqrt(a)*(-I*a - 2*I*b))*sqrt((2*a*sqrt((a*b + b^2)/a^2) - 
 a - 2*b)/a)*elliptic_f(arcsin(sqrt((2*a*sqrt((a*b + b^2)/a^2) - a - 2*b)/ 
a)*(cos(f*x + e) - I*sin(f*x + e))), (a^2 + 8*a*b + 8*b^2 + 4*(a^2 + 2*a*b 
)*sqrt((a*b + b^2)/a^2))/a^2))/(a^2*f)
 
3.3.59.6 Sympy [F]

\[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int \frac {\sec {\left (e + f x \right )}}{\sqrt {a + b \sec ^{2}{\left (e + f x \right )}}}\, dx \]

input
integrate(sec(f*x+e)/(a+b*sec(f*x+e)**2)**(1/2),x)
 
output
Integral(sec(e + f*x)/sqrt(a + b*sec(e + f*x)**2), x)
 
3.3.59.7 Maxima [F]

\[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int { \frac {\sec \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right )^{2} + a}} \,d x } \]

input
integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="maxima")
 
output
integrate(sec(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)
 
3.3.59.8 Giac [F]

\[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int { \frac {\sec \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right )^{2} + a}} \,d x } \]

input
integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="giac")
 
output
integrate(sec(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)
 
3.3.59.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int \frac {1}{\cos \left (e+f\,x\right )\,\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}}} \,d x \]

input
int(1/(cos(e + f*x)*(a + b/cos(e + f*x)^2)^(1/2)),x)
 
output
int(1/(cos(e + f*x)*(a + b/cos(e + f*x)^2)^(1/2)), x)